<template>
	<view class="content">
		<view>{{num}}</view>
		<button @click="num++">+1</button>
		<view v-for="item in list" :key="item.id">
			<text>{{item.id}}</text>
			-- 
			<text>{{item.todo}}</text>
		</view>
	</view>
</template>

<script setup>
	import {ref,reactive,onMounted} from "vue"
	import {onLoad} from "@dcloudio/uni-app"
	const num = ref(0);
	const list = reactive([
		{id:1,todo:"学习uniapp",done:false},
		{id:2,todo:"学习vue3",done:true},
		{id:3,todo:"学习vue2",done:true},
	])
	
	onMounted(()=>{
		console.log("vue3的生命周期函数~")
	})
	
	onLoad((options)=>{
		console.log("接收到的参数:",options)
	})
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
